import { connect } from "dva"
import TeacherTable from "../../TeacherTable"

const matStateToProps = state=>({
    teas:state.teacher.result.datas,
    current: state.teacher.condition.page,
    total: state.teacher.result.total,
    panelNumber: 5,
    showQuickJumper: true,
    loading: state.loading.effects["teacher/fetchStudents"]
})

const mapDispatchToProps = dispatch => ({
    onChange(newPage) {
        dispatch({
            type: "teacher/setCondition",
            payload: {
                page: newPage
            }
        })
    }
})


export default connect(matStateToProps, mapDispatchToProps)(TeacherTable)